package com.indusfo.spc.controller;

import com.indusfo.spc.pojo.FixedDete;
import com.indusfo.spc.service.FixedDeteService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author louk
 * @description 固定检测项目接口
 * @date 2019/11/22 13:34
 */
@Controller
@RequestMapping("/service/fixedDete")
public class FixedDeteController {

    @Autowired
    private FixedDeteService fixedDeteService;

    /**
     * 新增固定检测项目
     * @param fixedDete
     * @return
     */
    @RequestMapping("/insertFixedDete")
    @ResponseBody
    public  JSONObject insertFixedDete(FixedDete fixedDete){

        return fixedDeteService.insertFixedDete(fixedDete);
    }

    /**
     * 更新固定检测项目
     * @param fixedDete
     * @return
     */
    @RequestMapping("/updateFixedDete")
    @ResponseBody
    public  JSONObject updateFixedDete(FixedDete fixedDete){
        return fixedDeteService.updateFixedDete(fixedDete);
    }

    /**
     * 启用停用删除
     * @param fixedDeteIds
     * @param dataState
     * @return
     */
    @RequestMapping("/definesFixedDete")
    @ResponseBody
    public  JSONObject definesFixedDete(Integer[] fixedDeteIds,Integer dataState){
        return fixedDeteService.definesFixedDete(fixedDeteIds,dataState);
    }

    /**
     * 查询
     * @param fixedDete
     * @return
     */
    @RequestMapping("queryFixedDete")
    @ResponseBody
    public  JSONObject queryFixedDete(FixedDete fixedDete){
        return fixedDeteService.queryFixedDete(fixedDete);
    }

    /**
     * 查询判定项目的固定检测项目
     * @param fixedDete
     * @return
     */
    @RequestMapping("queryJudgeFixedDete")
    @ResponseBody
    public  JSONObject queryJudgeFixedDete(FixedDete fixedDete){
        return fixedDeteService.queryJudgeFixedDete(fixedDete);
    }
}
